package com.spi.soconversion.orders;

import java.math.BigDecimal;

import com.spi.soconversion.util.SOCUtility;

public class SOCClosedOrderLine {
	
		private String headerId;
		private String orderNumber;
		private String orderDate;
		private String lineCatCode;
		private String lineTypeId;		
		private String lineId;
		private String lineNumber;
		private String partyID;
		private String custEmailID;
		private String salesRepId; 
		private String salesRepName; 
		private String sellingStore; 
		private String taxExemptionType; 
		private String employyBadge; 
		private String headerInvoiceToOrgId; 
		private String headerShipToOrgId; 
		private String headerPackingInstructions; 
		private String headerShippingInstructions; 
		private String headerShipToKey;
		private String headerBillToKey;
		private String lineShipToKey;
		private String lineBilltoKey;
		private String shippingMethodCode; 
		private String scheduleShipDate; 
		private String promiseDate; 
		private String lineShipToOrgId; 
		private String lineShipFromOrgId; 
		private String tntDeliveryTimeslot; 
		private String linePackingInstructions; 
		private String lineShippingInstructions; 
		private BigDecimal unitSellingPrice; 
		private BigDecimal unitListPrice; 
		private int pricingQty; 
		private int orderedQty; 
		private String subinventory; 
		private BigDecimal taxValue; 
		private String giftRegLineNum;
		private String giftRegNum; 
		private String lineReturnContext;
		private String lineReturnReasonCode;
		private String lineRefLineId;                                                                                                                                                                                    
		private String lineRefHeaderId;
		private String lineReturnAttr1;
		private String lineReturnAttr2;
		private String lineReturnAttr3;
		private String lineReturnAttr4;
		private String lineReturnAttr5;
		private String lineServiceRefLineId; 
		private String lineRMA;
		private String inventoryItemId; 
		private String itemSKU; 
		private String itemType;
		private String itemDescription; 
		private String itemCatalogGroupId;
		private String itemCategory;
		private String primaryUnitofMeasure; 
		private String orgName; 
		private String timeZone; 
		private String locationId; 
		private String cashReceiptId; 
		private String cashReceiptDate; 
		private String operator; 
		private String terminal; 
		private String posTxNum; 
		private String posStoreNum; 
		private String taxProvince; 
		private BigDecimal gstTax; 
		private BigDecimal gstPercent; 
		private BigDecimal pstTax; 
		private BigDecimal pstPercent; 
		private BigDecimal hstTax;
		private BigDecimal hstPercent; 
		private String deliveryId;
		private String lineStatus;
		private boolean isReturned = false;
		private SOCClosedOrderLine returnLine;
		
		public String getHeaderId() {
			return headerId;
		}
		
		public void setHeaderId(String headerId) {
			this.headerId = headerId;
		}
		
		public String getOrderNumber() {
			return orderNumber;
		}
		
		public void setOrderNumber(String orderNumber) {
			this.orderNumber = orderNumber;
		}
		
		public String getOrderDate() {
			return orderDate;
		}
		
		public void setOrderDate(String orderDate) {
			this.orderDate = orderDate;
		}
		
		public String getLineCatCode() {
			return lineCatCode;
		}
		
		public void setLineCatCode(String lineCatCode) {
			this.lineCatCode = lineCatCode;
		}
		
		public String getLineTypeId() {
			return lineTypeId;
		}
		
		public void setLineTypeId(String lineTypeId) {
			this.lineTypeId = lineTypeId;
		}
		
		public String getLineId() {
			return lineId;
		}
		
		public void setLineId(String lineId) {
			this.lineId = lineId;
		}
		
		public String getLineNumber() {
			return lineNumber;
		}
		
		public void setLineNumber(String lineNumber) {
			this.lineNumber = lineNumber;
		}
		
		public String getCustEmailID() {
			return custEmailID;
		}
		
		public void setCustEmailID(String custEmailID) {
			this.custEmailID = custEmailID;
		}
		
		public String getPartyID() {
			return partyID;
		}
		
		public void setPartyID(String partyID) {
			this.partyID = partyID;
		}
		
		public String getSalesRepId() {
			return salesRepId;
		}
		
		public void setSalesRepId(String salesRepId) {
			this.salesRepId = salesRepId;
		}
		
		public String getSalesRepName() {
			return salesRepName;
		}
		
		public void setSalesRepName(String salesRepName) {
			this.salesRepName = salesRepName;
		}
		
		public String getSellingStore() {
			return sellingStore;
		}
		
		public void setSellingStore(String sellingStore) {
			this.sellingStore = sellingStore;
		}
		
		public String getTaxExemptionType() {
			if(taxExemptionType!=null  && !"null".equals(taxExemptionType))
			{
				return "Y";
			}
			return "N";
		}
		
		public void setTaxExemptionType(String taxExemptionType) {
			this.taxExemptionType = taxExemptionType;
		}
		
		public String getEmployyBadge() {
			return employyBadge;
		}
		
		public void setEmployyBadge(String employyBadge) {
			this.employyBadge = employyBadge;
		}
		
		public String getHeaderInvoiceToOrgId() {
			return headerInvoiceToOrgId;
		}
		
		public void setHeaderInvoiceToOrgId(String headerInvoiceToOrgId) {
			this.headerInvoiceToOrgId = headerInvoiceToOrgId;
		}
		
		public String getHeaderShipToOrgId() {
			return headerShipToOrgId;
		}
		
		public void setHeaderShipToOrgId(String headerShipToOrgId) {
			this.headerShipToOrgId = headerShipToOrgId;
		}
		
		public String getHeaderPackingInstructions() {
			return SOCUtility.removeNonBreakSpace(headerPackingInstructions);
		}
		
		public void setHeaderPackingInstructions(String headerPackingInstructions) {
			this.headerPackingInstructions = headerPackingInstructions;
		}
		
		public String getHeaderShippingInstructions() {
			return SOCUtility.removeNonBreakSpace(headerShippingInstructions);
		}
		
		public void setHeaderShippingInstructions(String headerShippingInstructions) {
			this.headerShippingInstructions = headerShippingInstructions;
		}
		
		public String getShippingMethodCode() {
			return shippingMethodCode;
		}
		
		public void setShippingMethodCode(String shippingMethodCode) {
			this.shippingMethodCode = shippingMethodCode;
		}
		
		public String getScheduleShipDate() {
			return scheduleShipDate;
		}
		
		public void setScheduleShipDate(String scheduleShipDate) {
			this.scheduleShipDate = scheduleShipDate;
		}
		
		public String getPromiseDate() {
			return promiseDate;
		}
		
		public void setPromiseDate(String promiseDate) {
			this.promiseDate = promiseDate;
		}
		
		public String getLineShipToOrgId() {
			return lineShipToOrgId;
		}
		
		public void setLineShipToOrgId(String lineShipToOrgId) {
			this.lineShipToOrgId = lineShipToOrgId;
		}
		
		public String getLineShipFromOrgId() {
			return lineShipFromOrgId;
		}
		
		public void setLineShipFromOrgId(String lineShipFromOrgId) {
			this.lineShipFromOrgId = lineShipFromOrgId;
		}
		
		public String getTntDeliveryTimeslot() {
			return tntDeliveryTimeslot;
		}
		
		public void setTntDeliveryTimeslot(String tntDeliveryTimeslot) {
			this.tntDeliveryTimeslot = tntDeliveryTimeslot;
		}
		
		public String getLinePackingInstructions() {
			return SOCUtility.removeNonBreakSpace(linePackingInstructions);
		}
		
		public void setLinePackingInstructions(String linePackingInstructions) {
			this.linePackingInstructions = linePackingInstructions;
		}
		
		public String getLineShippingInstructions() {
			return SOCUtility.removeNonBreakSpace(lineShippingInstructions);
		}
		
		public void setLineShippingInstructions(String lineShippingInstructions) {
			this.lineShippingInstructions = lineShippingInstructions;
		}
		
		public BigDecimal getUnitSellingPrice() {
			return SOCUtility.checkNumberNull(unitSellingPrice);
		}
		
		public void setUnitSellingPrice(BigDecimal unitSellingPrice) {
			this.unitSellingPrice = unitSellingPrice;
		}
		
		public BigDecimal getUnitListPrice() {
			return SOCUtility.checkNumberNull(unitListPrice);
		}
		
		public void setUnitListPrice(BigDecimal unitListPrice) {
			this.unitListPrice = unitListPrice;
		}
		
		public int getPricingQty() {
			return pricingQty;
		}
		
		public void setPricingQty(int pricingQty) {
			this.pricingQty = pricingQty;
		}
		
		public int getOrderedQty() {
			return orderedQty;
		}
		
		public void setOrderedQty(int orderedQty) {
			this.orderedQty = orderedQty;
		}
		
		public String getSubinventory() {
			return subinventory;
		}
		
		public void setSubinventory(String subinventory) {
			this.subinventory = subinventory;
		}
		
		public BigDecimal getTaxValue() {
			return SOCUtility.checkNumberNull(taxValue);
		}
		
		public void setTaxValue(BigDecimal taxValue) {
			this.taxValue = taxValue;
		}
		
		public String getGiftRegLineNum() {
			return giftRegLineNum;
		}
		
		public void setGiftRegLineNum(String giftRegLineNum) {
			this.giftRegLineNum = giftRegLineNum;
		}
		
		public String getGiftRegNum() {
			return giftRegNum;
		}
		
		public void setGiftRegNum(String giftRegNum) {
			this.giftRegNum = giftRegNum;
		}
		
		public String getLineReturnContext() {
			return lineReturnContext;
		}
		
		public void setLineReturnContext(String lineReturnContext) {
			this.lineReturnContext = lineReturnContext;
		}
		
		public String getLineReturnReasonCode() {
			return lineReturnReasonCode;
		}
		
		public void setLineReturnReasonCode(String lineReturnReasonCode) {
			this.lineReturnReasonCode = lineReturnReasonCode;
		}
		
		public String getLineRefLineId() {
			return lineRefLineId;
		}
		
		public void setLineRefLineId(String lineRefLineId) {
			this.lineRefLineId = lineRefLineId;
		}
		
		public String getLineRefHeaderId() {
			return lineRefHeaderId;
		}
		
		public void setLineRefHeaderId(String lineRefHeaderId) {
			this.lineRefHeaderId = lineRefHeaderId;
		}
		
		public String getLineReturnAttr1() {
			return lineReturnAttr1;
		}
		
		public void setLineReturnAttr1(String lineReturnAttr1) {
			this.lineReturnAttr1 = lineReturnAttr1;
		}
		
		public String getLineReturnAttr2() {
			return lineReturnAttr2;
		}
		
		public void setLineReturnAttr2(String lineReturnAttr2) {
			this.lineReturnAttr2 = lineReturnAttr2;
		}
		
		public String getLineReturnAttr3() {
			return lineReturnAttr3;
		}
		
		public void setLineReturnAttr3(String lineReturnAttr3) {
			this.lineReturnAttr3 = lineReturnAttr3;
		}
		
		public String getLineReturnAttr4() {
			return lineReturnAttr4;
		}
		
		public void setLineReturnAttr4(String lineReturnAttr4) {
			this.lineReturnAttr4 = lineReturnAttr4;
		}
		
		public String getLineReturnAttr5() {
			return lineReturnAttr5;
		}
		
		public void setLineReturnAttr5(String lineReturnAttr5) {
			this.lineReturnAttr5 = lineReturnAttr5;
		}
		
		public String getLineServiceRefLineId() {
			return lineServiceRefLineId;
		}
		
		public void setLineServiceRefLineId(String lineServiceRefLineId) {
			this.lineServiceRefLineId = lineServiceRefLineId;
		}
		
		public String getLineRMA() {
			return lineRMA;
		}
		
		public void setLineRMA(String lineRMA) {
			this.lineRMA = lineRMA;
		}
		
		public String getInventoryItemId() {
			return inventoryItemId;
		}
		
		public void setInventoryItemId(String inventoryItemId) {
			this.inventoryItemId = inventoryItemId;
		}
		
		public String getItemSKU() {
			return itemSKU;
		}
		
		public void setItemSKU(String itemSKU) {
			this.itemSKU = itemSKU;
		}
		
		public String getItemType() {
			return itemType;
		}
		
		public void setItemType(String itemType) {
			this.itemType = itemType;
		}
		
		public String getItemDescription() {
			return itemDescription;
		}
		
		public void setItemDescription(String itemDescription) {
			this.itemDescription = itemDescription;
		}
		
		public String getItemCatalogGroupId() {
			return itemCatalogGroupId;
		}
		
		public void setItemCatalogGroupId(String itemCatalogGroupId) {
			this.itemCatalogGroupId = itemCatalogGroupId;
		}
		
		public String getItemCategory() {
			return itemCategory;
		}
		
		public void setItemCategory(String itemCategory) {
			this.itemCategory = itemCategory;
		}
		
		public String getPrimaryUnitofMeasure() {
			return primaryUnitofMeasure;
		}
		
		public void setPrimaryUnitofMeasure(String primaryUnitofMeasure) {
			this.primaryUnitofMeasure = primaryUnitofMeasure;
		}
		
		public String getOrgName() {
			return orgName;
		}
		
		public void setOrgName(String orgName) {
			this.orgName = orgName;
		}
		
		public String getTimeZone() {
			return timeZone;
		}
		
		public void setTimeZone(String timeZone) {
			this.timeZone = timeZone;
		}

		public String getLocationId() {
			return locationId;
		}
		
		public void setLocationId(String locationId) {
			this.locationId = locationId;
		}
		
		public String getCashReceiptId() {
			return cashReceiptId;
		}
		
		public void setCashReceiptId(String cashReceiptId) {
			this.cashReceiptId = cashReceiptId;
		}
		
		public String getCashReceiptDate() {
			return cashReceiptDate;
		}
		
		public void setCashReceiptDate(String cashReceiptDate) {
			this.cashReceiptDate = cashReceiptDate;
		}
		
		public String getOperator() {
			return operator;
		}
		
		public void setOperator(String operator) {
			this.operator = operator;
		}
		
		public String getTerminal() {
			return terminal;
		}
		
		public void setTerminal(String terminal) {
			this.terminal = terminal;
		}
		
		public String getPosTxNum() {
			return posTxNum;
		}
		
		public void setPosTxNum(String posTxNum) {
			this.posTxNum = posTxNum;
		}
		
		public String getPosStoreNum() {
			return posStoreNum;
		}
		
		public void setPosStoreNum(String posStoreNum) {
			this.posStoreNum = posStoreNum;
		}
		
		public String getTaxProvince() {
			return taxProvince;
		}
		
		public void setTaxProvince(String taxProvince) {
			this.taxProvince = taxProvince;
		}
		
		public BigDecimal getGstTax() {
			return SOCUtility.checkNumberNull(gstTax);
		}
		
		public void setGstTax(BigDecimal gstTax) {
			this.gstTax = gstTax;
		}
		
		public BigDecimal getGstPercent() {
			return SOCUtility.checkNumberNull(gstPercent);
		}
		
		public void setGstPercent(BigDecimal gstPercent) {
			this.gstPercent = gstPercent;
		}
		
		public BigDecimal getPstTax() {
			return SOCUtility.checkNumberNull(pstTax);
		}
		
		public void setPstTax(BigDecimal pstTax) {
			this.pstTax = pstTax;
		}
		
		public BigDecimal getPstPercent() {
			return SOCUtility.checkNumberNull(pstPercent);
		}
		
		public void setPstPercent(BigDecimal pstPercent) {
			this.pstPercent = pstPercent;
		}
		
		public BigDecimal getHstTax() {
			return SOCUtility.checkNumberNull(hstTax);
		}
		
		public void setHstTax(BigDecimal hstTax) {
			this.hstTax = hstTax;
		}
		
		public BigDecimal getHstPercent() {	        
			return SOCUtility.checkNumberNull(hstPercent);
		}
		
		public void setHstPercent(BigDecimal hstPercent) {
			this.hstPercent = hstPercent;
		}
		
		public String getDeliveryId() {
			return deliveryId;
		}
		
		public void setDeliveryId(String deliveryId) {
			this.deliveryId = deliveryId;
		}
		
		public String getLineStatus() {
			return lineStatus;
		}
		
		public void setLineStatus(String lineStatus) {
			this.lineStatus = lineStatus;
		}
		
		public void setIsReturned(boolean returnedLine)
		{
			this.isReturned = returnedLine;
		}
		
		public boolean getIsReturned()
		{
			return isReturned;
		}
		
		public SOCClosedOrderLine getReturnLine() {
			return returnLine;
		}
		
		public void setReturnLine(SOCClosedOrderLine returnLine) {
			this.returnLine = returnLine;
		}
		
		public String getHeaderShipToKey() {
			return headerShipToKey;
		}

		public void setHeaderShipToKey(String headerShipToKey) {
			this.headerShipToKey = headerShipToKey;
		}

		public String getHeaderBillToKey() {
			return headerBillToKey;
		}

		public void setHeaderBillToKey(String headerBillToKey) {
			this.headerBillToKey = headerBillToKey;
		}

		public String getLineShipToKey() {
			return lineShipToKey;
		}

		public void setLineShipToKey(String lineShipToKey) {
			this.lineShipToKey = lineShipToKey;
		}

		public String getLineBilltoKey() {
			return lineBilltoKey;
		}

		public void setLineBilltoKey(String lineBilltoKey) {
			this.lineBilltoKey = lineBilltoKey;
		}

		public void setReturned(boolean isReturned) {
			this.isReturned = isReturned;
		}

		@Override
		public int hashCode() {
			final int prime = 35;
			int result = 1;
			result = prime * result + ((lineId == null) ? 0 : lineId.hashCode());
			return result;
		}

		@Override
		public boolean equals(Object obj) {
			if (this == obj)
				return true;
			if (obj == null)
				return false;
			if (getClass() != obj.getClass())
				return false;
			SOCClosedOrderLine other = (SOCClosedOrderLine) obj;
			if (lineId == null) {
				if (other.lineId != null)
					return false;
			} else if (!lineId.equals(other.lineId))
				return false;
			
			return true;
		}

}
